home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11.lha / libX11 / xemul3.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-22  |  13.4 KB  |  581 lines

  1. /* Copyright (c) 1996 by Terje Pedersen.  All Rights Reserved   */
  2. /*                                                              */
  3. /* By using this code you will agree to these terms:            */
  4. /*                                                              */
  5. /* 1. You may not use this code for profit in any way or form   */
  6. /*    unless an agreement with the author has been reached.     */
  7. /*                                                              */
  8. /* 2. The author is not responsible for any damages caused by   */
  9. /*    the use of this code.                                     */
  10. /*                                                              */
  11. /* 3. All modifications are to be released to the public.       */
  12. /*                                                              */
  13. /* Thats it! Have fun!                                          */
  14. /* TP                                                           */
  15. /*                                                              */
  16.  
  17. #include <intuition/intuition.h>
  18. #include <intuition/intuitionbase.h>
  19.  
  20. #include <graphics/gfx.h>
  21. #include <graphics/gfxbase.h>
  22. #include <graphics/gfxmacros.h>
  23. #include <graphics/displayinfo.h>
  24. #include <devices/timer.h>
  25.  
  26. #include <proto/intuition.h>
  27. #include <proto/graphics.h>
  28. #include <proto/gadtools.h>
  29. #include <proto/layers.h>
  30.  
  31. #include <dos.h>
  32. #include <signal.h>
  33. #include <stdlib.h>
  34. #include <time.h>
  35. #include <stdio.h>
  36.  
  37. #include "libX11.h"
  38.  
  39. #define XLIB_ILLEGAL_ACCESS 1
  40.  
  41. #include <X11/X.h>
  42. #include <X11/Xlib.h>
  43. #include <X11/Xutil.h>
  44. #include <X11/Intrinsic.h>
  45. #include <X11/IntrinsicP.h>
  46. #include <X11/CoreP.h>
  47. #include "amigax_proto.h"
  48. #include "amiga_x.h"
  49.  
  50. int (*XSynchronize(Display*d, Bool onoff))(Display *d,Bool onoff){
  51. }
  52.  
  53. /*int XSynchronize(Display *d,Bool onoff){/*            File 'xv.o' */
  54. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  55.   printf("WARNING: XSynchronize\n");
  56. #endif
  57.   return(0);
  58. }*/
  59.  
  60. XSetSelectionOwner(){/* File 'xvevent.o' */
  61. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  62.   printf("WARNING: XSetSelectionOwner\n");
  63. #endif
  64.   return(0);
  65. }
  66.  
  67. KeyCode XKeysymToKeycode(display, keysym)
  68.      Display *display;
  69.      KeySym keysym;
  70. {/*        File 'xvmisc.o' */
  71. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  72.   printf("WARNING: XKeysymToKeycode\n");
  73. #endif
  74.   return(0);
  75. }
  76.  
  77. getwd(){/*                   File 'xvmisc.o' */
  78. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  79.   printf("WARNING: getwd\n");
  80. #endif
  81.   return(0);
  82. }
  83.  
  84. XUngrabServer(){/*           File 'xvevent.o' */
  85. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  86.   printf("WARNING: XUngrabServer\n");
  87. #endif
  88.   return(0);
  89. }
  90.  
  91. XTranslateCoordinates(){/*   File 'xv.o' */
  92. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  93.   printf("WARNING: XTranslateCoordinates\n");
  94. #endif
  95.   return(0);
  96. }
  97.  
  98. umask(){/*                   File 'xvbrowse.o' */
  99. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  100.   printf("WARNING: umask\n");
  101. #endif
  102.   return(0);
  103. }
  104.  
  105. XGrabButton(){/*             File 'xvgrab.o' */
  106. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  107.   printf("WARNING: XGrabButton\n");
  108. #endif
  109.   return(0);
  110. }
  111.  
  112. XSetTransientForHint(){/*    File 'xv.o' */
  113. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  114.   printf("WARNING: XSetTransientForHint\n");
  115. #endif
  116.   return(0);
  117. }
  118.  
  119. XSetCloseDownMode(){/*       File 'xvroot.o' */
  120. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  121.   printf("WARNING: XSetCloseDownMode\n");
  122. #endif
  123.   return(0);
  124. }
  125.  
  126. XDeleteProperty(){/*         File 'xvroot.o' */
  127. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  128.   printf("WARNING: XDeleteProperty\n");
  129. #endif
  130.   return(0);
  131. }
  132.  
  133. XGrabServer(){/*             File 'xvgrab.o' */
  134. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  135.   printf("WARNING: XGrabServer\n");
  136. #endif
  137.   return(0);
  138. }
  139.  
  140. random(){
  141. #if (DEBUGXEMUL_ENTRY)
  142.   printf("random\n");
  143. #endif
  144.   return(rand());
  145. }
  146.  
  147. /*
  148. TDelay(){/*                  File 'xvmisc.o' */
  149. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  150.   printf("WARNING: TDelay\n");
  151. #endif
  152.   return(0);
  153. }
  154. */
  155.  
  156. endpwent(){/*                File 'xvdir.o' */
  157. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  158.   printf("WARNING: endpwent\n");
  159. #endif
  160.   return(0);
  161. }
  162.  
  163. XStoreBytes(){/*             File 'xvevent.o' */
  164. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  165.   printf("WARNING: XStoreBytes\n");
  166. #endif
  167.   return(0);
  168. }
  169.  
  170. XSetSubwindowMode(){/*       File 'xvgrab.o' */
  171. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  172.   printf("WARNING: XSetSubwindowMode\n");
  173. #endif
  174.   return(0);
  175. }
  176.  
  177. srandom(n){/*                 File 'xv.o' */
  178. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  179.   printf("WARNING: srandom\n");
  180. #endif
  181.   srand(n);
  182. }
  183.  
  184. XGetNormalHints(){/*         File 'xv.o' */
  185. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  186.   printf("WARNING: XGetNormalHints\n");
  187. #endif
  188.   return(0);
  189. }
  190.  
  191. XUngrabButton(){/*           File 'xvevent.o' */
  192. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  193.   printf("WARNING: XUngrabButton\n");
  194. #endif
  195.   return(0);
  196. }
  197.  
  198. mknod(){/*                   File 'xvbrowse.o' */
  199. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  200.   printf("WARNING: mknod\n");
  201. #endif
  202.   return(0);
  203. }
  204.  
  205. XKillClient(){/*             File 'xvroot.o' */
  206. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  207.   printf("WARNING: XKillClient\n");
  208. #endif
  209.   return(0);
  210. }
  211.  
  212. void XtRemoveCallback(object, callback_name, callback, client_data)
  213.      Widget object;
  214.      String callback_name;
  215.      XtCallbackProc callback;
  216.      XtPointer client_data;
  217. {/*        File 'Paint.o'*/
  218. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  219.   printf("WARNING: _XtRemoveCallback\n");
  220. #endif
  221.   return(0);
  222. }
  223.  
  224. RWGetMsg(){/*                File 'fileName.o'*/
  225. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  226.   printf("WARNING: RWGetMsg\n");
  227. #endif
  228.   return(0);
  229. }
  230.  
  231. void XtMoveWidget(w, x, y)
  232.      Widget w;
  233.      Position x;
  234.      Position y;
  235. {/*            File 'PaintRegion.o'*/
  236. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  237.   printf("WARNING: XtMoveWidget\n");
  238. #endif
  239.   return(0);
  240. }
  241.  
  242. char *XtCalloc(num, size)
  243. Cardinal num;
  244. Cardinal size;
  245. {/*                File 'graphic.o'*/
  246. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  247.   printf("WARNING: XtCalloc\n");
  248. #endif
  249.   return(0);
  250. }
  251.  
  252. RWtableGetEntry(){/*         File 'fileName.o'*/
  253. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  254.   printf("WARNING: RWtableGetEntry\n");
  255. #endif
  256.   return(0);
  257. }
  258.  
  259. RWtableGetWriterList(){/*    File 'fileName.o'*/
  260. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  261.   printf("WARNING: RWtableGetWriterList\n");
  262. #endif
  263.   return(0);
  264. }
  265.  
  266. XawToggleGetCurrent(){/*     File 'graphic.o'*/
  267. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  268.   printf("WARNING: XawToggleGetCurrent\n");
  269. #endif
  270.   return(0);
  271. }
  272.  
  273. void XtAugmentTranslations(w, translations)
  274.      Widget w;
  275.      XtTranslations translations;
  276. {/*   File 'operation.o'*/
  277. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  278.   printf("WARNING: XtAugmentTranslations\n");
  279. #endif
  280.   return(0);
  281. }
  282.  
  283. XawListChange(){/*           File 'fileName.o'*/
  284. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  285.   printf("WARNING: XawListChange\n");
  286. #endif
  287.   return(0);
  288. }
  289.  
  290. RWtableGetReaderID(){/*      File 'fileName.o'*/
  291. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  292.   printf("WARNING: RWtableGetReaderID\n");
  293. #endif
  294.   return(0);
  295. }
  296.  
  297. XawToggleSetCurrent(){/*     File 'operation.o'*/
  298. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  299.   printf("WARNING: XawToggleSetCurrent\n");
  300. #endif
  301.   return(0);
  302. }
  303.  
  304. XShapeCombineMask(){/*       File 'PaintRegion.o'*/
  305. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  306.   printf("WARNING: XShapeCombineMask\n");
  307. #endif
  308.   return(0);
  309. }
  310.  
  311. void XtPopup(popup_shell, grab_kind)
  312.      Widget popup_shell;
  313.      XtGrabKind grab_kind;
  314. {/*                 File 'fileName.o'*/
  315. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  316.   printf("WARNING: XtPopup\n");
  317. #endif
  318.   return(0);
  319. }
  320.  
  321. void XtCallCallbacks(object, callback_name, call_data)
  322.      Widget object;
  323.      String callback_name;
  324.      XtPointer call_data;
  325. {/*      File 'Colormap.o'*/
  326. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  327.   printf("WARNING: XtCallCallbackList\n");
  328. #endif
  329.   return(0);
  330. }
  331.  
  332. Widget XtNameToWidget(Widget reference,_Xconst _XtString names){/*          File 'fileName.o'*/
  333. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  334.   printf("WARNING: XtNameToWidget\n");
  335. #endif
  336.   return(0);
  337. }
  338.  
  339. char *XtRealloc(ptr, num)
  340.      char *ptr;
  341.      Cardinal num;
  342. {/*               File 'operation.o'*/
  343. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  344.   printf("WARNING: XtRealloc\n");
  345. #endif
  346.   return(0);
  347. }
  348.  
  349. RWtableGetWriter(){/*        File 'fileName.o'*/
  350. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  351.   printf("WARNING: RWtableGetWriter\n");
  352. #endif
  353.   return(0);
  354. }
  355.  
  356. void XtSetTypeConverter(from_type, to_type, converter, convert_args,
  357.             num_args, cache_type, destructor)
  358.      String from_type, to_type;
  359.      XtTypeConverter converter;
  360.      XtConvertArgList convert_args;
  361.      Cardinal num_args;
  362.      XtCacheType cache_type;
  363.      XtDestructor destructor;
  364. {/*      File 'typeConvert.o'*/
  365. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  366.   printf("WARNING: XtSetTypeConverter\n");
  367. #endif
  368.   return(0);
  369. }
  370.  
  371. XtAccelerators XtParseAcceleratorTable(table)
  372.      String table;
  373. {/* File 'fileName.o'*/
  374. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  375.   printf("WARNING: XtParseAcceleratorTable\n");
  376. #endif
  377.   return(0);
  378. }
  379.  
  380. void XtInstallAccelerators(destination, source)
  381.      Widget destination;
  382.      Widget source;
  383. {/*   File 'fileName.o'*/
  384. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  385.   printf("WARNING: XtInstallAccelerators\n");
  386. #endif
  387.   return(0);
  388. }
  389.  
  390. XAllowEvents(){/*            File 'grab.o'*/
  391. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  392.   printf("WARNING: XAllowEvents\n");
  393. #endif
  394.   return(0);
  395. }
  396.  
  397. void XtCallActionProc(widget, action, event, params, num_params)
  398.      Widget widget;
  399.      String action;
  400.      XEvent *event;
  401.      String *params;
  402.      Cardinal num_params;
  403. {/*        File 'text.o'*/
  404. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  405.   printf("WARNING: XtCallActionProc\n");
  406. #endif
  407.   return(0);
  408. }
  409.  
  410. String XtName(Widget object){/*                  File 'fileName.o'*/
  411. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  412.   printf("WARNING: XtName\n");
  413. #endif
  414.   return(0);
  415. }
  416.  
  417. void XtSetKeyboardFocus(subtree, descendant)
  418.      Widget subtree, descendant;
  419. {/*      File 'fileName.o'*/
  420. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  421.   printf("WARNING: XtSetKeyboardFocus\n");
  422. #endif
  423.   return(0);
  424. }
  425.  
  426. void XtRemoveEventHandler(w, event_mask, nonmaskable, proc,
  427.               client_data)
  428.      Widget w;
  429.      EventMask event_mask;
  430.      Boolean nonmaskable;
  431.      XtEventHandler proc;
  432.      XtPointer client_data;
  433. {/*    File 'protocol.o'*/
  434. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  435.   printf("WARNING: XtRemoveEventHandler\n");
  436. #endif
  437.   return(0);
  438. }
  439.  
  440. XawListShowCurrent(){/*      File 'fileName.o'*/
  441. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  442.   printf("WARNING: XawListShowCurrent\n");
  443. #endif
  444.   return(0);
  445. }
  446.  
  447. void XtReleaseGC(object, gc)
  448.      Widget object;
  449.      GC gc;
  450. {/*             File 'cutCopyPaste.o'*/
  451. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  452.   printf("WARNING: XtReleaseGC\n");
  453. #endif
  454.   return(0);
  455. }
  456.  
  457. void XtResizeWidget(w, width, height, border_width)
  458.      Widget w;
  459.      Dimension width;
  460.      Dimension height;
  461.      Dimension border_width;
  462. {/*          File 'fatBitsEdit.o'*/
  463. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  464.   printf("WARNING: XtResizeWidget\n");
  465. #endif
  466.   return(0);
  467. }
  468.  
  469. RWtableGetId(){/*            File 'fileName.o'*/
  470. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  471.   printf("WARNING: RWtableGetId\n");
  472. #endif
  473.   return(0);
  474. }
  475.  
  476. WriteAsciiPNMfd(){/*         File 'graphic.o'*/
  477. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  478.   printf("WARNING: WriteAsciiPNMfd\n");
  479. #endif
  480.   return(0);
  481. }
  482.  
  483. RWtableGetReader(){/*        File 'fileName.o'*/
  484. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  485.   printf("WARNING: RWtableGetReader\n");
  486. #endif
  487.   return(0);
  488. }
  489.  
  490. XawTextSinkSetTabs(){/*      File 'help.o'*/
  491. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  492.   printf("WARNING: XawTextSinkSetTabs\n");
  493. #endif
  494.   return(0);
  495. }
  496.  
  497. XQueryColor(){/*             File 'graphic.o'*/
  498. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  499.   printf("WARNING: XQueryColor\n");
  500. #endif
  501.   return(0);
  502. }
  503.  
  504. XawListHighlight(){/*        File 'fontSelect.o'*/
  505. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  506.   printf("WARNING: XawListHighlight\n");
  507. #endif
  508.   return(0);
  509. }
  510.  
  511. void XtRemoveTimeOut(id)
  512.      XtIntervalId id;
  513. {/*         File 'grab.o'*/
  514. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  515.   printf("WARNING: XtRemoveTimeOut\n");
  516. #endif
  517.   return(0);
  518. }
  519.  
  520. void XtPopdown(popup_shell)
  521.      Widget popup_shell;
  522. {/*               File 'fileName.o'*/
  523. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  524.   printf("WARNING: XtPopdown\n");
  525. #endif
  526.   return(0);
  527. }
  528.  
  529. XawScrollbarSetThumb(){/*    File 'fileName.o'*/
  530. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  531.   printf("WARNING: XawScrollbarSetThumb\n");
  532. #endif
  533.   return(0);
  534. }
  535.  
  536. XawToggleUnsetCurrent(){/*   File 'graphic.o'*/
  537. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  538.   printf("WARNING: XawToggleUnsetCurrent\n");
  539. #endif
  540.   return(0);
  541. }
  542.  
  543. void _XtInherit(void){/*              File 'Paint.o'*/
  544. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  545.   printf("WARNING: _XtInherit\n");
  546. #endif
  547.   return(0);
  548. }
  549.  
  550. RWtableGetReaderList(){/*    File 'fileName.o'*/
  551. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  552.   printf("WARNING: RWtableGetReaderList\n");
  553. #endif
  554.   return(0);
  555. }
  556.  
  557. XAutoRepeatOff(){/*          File 'libsprite/libsprite.lib'*/
  558. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  559.   printf("WARNING: AutoRepeatOff\n");
  560. #endif
  561.   return(0);
  562. }
  563.  
  564. void XSetWMNormalHints(
  565.     Display*display,
  566.     Window w ,
  567.     XSizeHints *hints
  568. ){/*       File 'libsprite/libsprite.lib'*/
  569. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  570.   printf("WARNING: SetWMNormalHints\n");
  571. #endif
  572.   return(0);
  573. }
  574.  
  575. XawDialogAddButton(){
  576. #if (DEBUGXEMUL_ENTRY) || (DEBUGXEMUL_WARNING)
  577.   printf("WARNING: XawDialogAddButton\n");
  578. #endif
  579.   return(0);
  580. }
  581.